package com.bdcom.autotest;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.RowSorter;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;

import com.bdcom.autotest.interaction.db.CheckMysql;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;

import com.bdcom.autotest.ui.ProgressWindow;
import com.bdcom.autotest.util.Prop;
import com.bdcom.autotest.util.UIUtil;

import static com.bdcom.autotest.interaction.http.NetcardUtil.loadAllNetcards;

/**
 *
 */
public class MainApp {
	
	private static Logger log = LoggerFactory.getLogger(MainApp.class);
	
	public static void main( String[] args ) {
		
		try {
			ProgressWindow progressWindow = new ProgressWindow();
			progressWindow.setVisible(true);
			UIUtil.initSkin();
			
			Prop.init( args );
			
			SpringApplication.run(SpringBootMain.class, args );
			loadAllNetcards();
			CheckMysql checkMySQL = new CheckMysql();
			checkMySQL.startMySQL();
			log.info( "spring boot init over !!!!!!!!!!!!!!!!!!!!!! " );
			BootThread bootThread = new BootThread();
			bootThread.start();
			MainFrame.getInstance().showFrame( bootThread );

			progressWindow.dispose();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
	
	

	
	
	
	
}
